﻿Public Class FrmNetSetting

    Private Sub FrmNetSetting_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Icon = My.Resources.Properties
        Try
            TextBox1.Text = My.Computer.FileSystem.ReadAllText(Application.StartupPath & "\server.txt").Trim
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Try
            If TextBox1.Text.Trim = String.Empty Then
                MsgBox("地址必须填写!")
                Return
            End If
            My.Computer.FileSystem.WriteAllText(Application.StartupPath & "\server.txt", TextBox1.Text.Trim, False)
            Dispose()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
End Class